package demo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor

public class JD implements Switch
{
    private String name;
    private boolean status;//false 默认是关闭的


    @Override
    public void press() {
        //控制设备的开和关
        status = !status;
    }
}
